package com.jack.helloworld.activity;

import android.os.Bundle;
import android.util.Log;

import com.jack.helloworld.R;
import com.jaredrummler.android.processes.AndroidProcesses;

import androidx.appcompat.app.AppCompatActivity;

public class AndroidProcessesActivity extends AppCompatActivity {

    private static final String TAG = AndroidProcessesActivity.class.getSimpleName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_android_processes);

        initData();
    }

    private void initData() {

        String topAppPackageName = AndroidProcesses.getRunningAppProcesses().get(0).getPackageName();

        Log.d(TAG, "initData: topAppPackageName:" + topAppPackageName);

    }
}
